package com.jh.paymentchannel.pojo.freeQuick;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;

import static org.apache.commons.lang3.StringUtils.isEmpty;

/**
 * 畅捷代还/提现记录表
 */
@Entity
@Table(name = "t_withdraw_temporary")
public class FreeQuickWithdrawTemp implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue
    @Column(name="id")
    private int id;

    /**
     * 用户id
     */
    @Column(name = "user_id")
    private String userId;

    /**
     * 请求流水号
     */
    @Column(name = "request_no")
    private String requestNo;

    /**
     * 商户编号
     */
    @Column(name = "merchant_no")
    private String merchantNo;

    /**
     * 渠道编码
     */
    @Column(name = "channel_id")
    private String channelId;

    /**
     * 提现金额
     */
    @Column(name = "amount")
    private String amount;

    /**
     * 返回编码
     * 200表示成功
     * 其他-表示失败 此字段是通信标识，非业务标识，业务是否 成功需要查看status判断
     */
    @Column(name="code")
    private String code;

    /**
     * 返回信息
     * 成功返回“操作成功”,失败返回错误原因
     */
    @Column(name="biz_msg")
    private String bizMsg;

    /**
     * 描述信息
     * 1代表请求未抛异常
     */
    @Column(name="biz_code")
    private String bizCode;


    @Column(name = "create_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Column(name = "update_time")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 用户输入金额
     */
    @Column(name = "in_amount")
    private BigDecimal inAmount = new BigDecimal("0.00");

    /**
     * 交易状态0:待提现,1：成功，2：失败，3：异常,4：提现中；
     */
    @Column(name = "pay_status")
    private String payStatus;

    /**
     * 交易类型1：在线收款和提现，2：代还
     */
    @Column(name = "pay_type")
    private String payType;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getRequestNo() {
        return requestNo;
    }

    public void setRequestNo(String requestNo) {
        this.requestNo = requestNo;
    }

    public String getMerchantNo() {
        return merchantNo;
    }

    public void setMerchantNo(String merchantNo) {
        this.merchantNo = merchantNo;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getBizMsg() {
        return bizMsg;
    }

    public void setBizMsg(String bizMsg) {
        this.bizMsg = bizMsg;
    }

    public String getBizCode() {
        return bizCode;
    }

    public void setBizCode(String bizCode) {
        this.bizCode = bizCode;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public BigDecimal getInAmount() {
        return inAmount;
    }

    public void setInAmount(BigDecimal inAmount) {
        this.inAmount = inAmount;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }
}
